<template>
    <div class="login-main" v-loading="submitLoading">
      <login-title  title="密钥登录" />
      
      <div class="flex-row">
            <img src="~@/assets/login/icon-back.svg" class="back-btn" @click="showLoginPage('login')" />
      </div>
      
      
      <form class="form" @submit.prevent="submit">
      
        <div class="flex-column title">
            <h2>密钥登录</h2>            
        </div>
        <p> </p>
        <div class="flex-row">
          <label>输入密钥</label>
        </div>
        <div class="inputForm">
          <img src="~@/assets/login/pass.svg" alt="password" />
          <input
            type="text"
            class="input"
            v-model="loginObj.password"
            placeholder="您的密钥"
          />
          
        </div>
        
        <div class="flex-row">
          <span class="span">免费获取登录密钥?</span>
        </div>
  
        <!-- 提交按钮 -->
        <button type="submit" class="button-submit">登录</button>  
      
  
  
    </form>
      </div> 
  </template>
  
  <script>
  import LoginTitle from '@/components/bar/LoginTitle.vue';
  
  export default {
    components: {
      LoginTitle
    },
    data() {
      return {
        regState: false,
        showPassword: false,
        submitLoading: false,
        loginObj: {  
          password: '',
    
        }
      }
    },
 
    methods: {
      showLoginPage(type) {
        if ('email' === type) {
            console.log("email login page");
            this.$router.push('/login/email')
        }else if ('mobile' === type) {
            console.log("mobile login page");
            this.$router.push('/login/mobile')
        } else if ('key' === type) {
            console.log("key login page");
            this.$router.push('/login/key')
        } else {
            console.log("hello page");
            this.$router.push('/login')
        }
      },   
      // 提交表单
      submit() {       
        console.log('提交表单');
      },

    }
  }
  </script>
  
  <style>
  @import './index.css';
  
  </style>
  